package cn.edu.xmu.javaee.chapter2.dependencyinjection.config;

import cn.edu.xmu.javaee.chapter2.dependencyinjection.bean.AliPayAdaptor;
import cn.edu.xmu.javaee.chapter2.dependencyinjection.bean.PaymentService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DependencyConfig {

    @Bean
    public PaymentService paymentService3(AliPayAdaptor payAdaptor){

        return new PaymentService(payAdaptor);
    }
}
